/* 首页整体布局 */
.home-page {
    min-height: 100vh;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 100px;
    /* 为固定的底部导航栏留出空间 */
}

/* 应用头部样式 */
.app-header {
    background: #1890ff;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.back-btn:active {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0.95);
}

.back-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.app-name {
    font-size: 18px;
    font-weight: 600;
}

.app-dot {
    font-size: 16px;
    opacity: 0.8;
}

.app-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.header-right {
    display: flex;
    gap: 16px;
}

.header-icon {
    font-size: 18px;
    cursor: pointer;
    opacity: 0.9;
}

/* 搜索框样式 */
.search-container {
    background: white;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.search-icon {
    font-size: 16px;
    color: #666;
    margin-right: 10px;
}

.search-placeholder {
    flex: 1;
    font-size: 15px;
    color: #999;
    pointer-events: none;
}

.search-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #5a6fd8;
}

/* 通知横幅样式 */
.notification-banner {
    background: #fff7e6;
    border: 1px solid #ffd591;
    margin: 16px 20px;
    padding: 14px 18px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    position: relative;
}

.notification-icon {
    font-size: 16px;
    color: #fa8c16;
    animation: bounce 2s infinite;
}

.notification-text {
    font-size: 14px;
    color: #d46b08;
    line-height: 1.4;
    white-space: nowrap;
    animation: marquee 15s linear infinite;
}

/* 添加动画关键帧 */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-5px);
    }

    60% {
        transform: translateY(-3px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* 添加闪烁效果 */
.notification-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* 功能卡片区域样式 */
.features-section {
    display: flex;
    gap: 16px;
    padding: 0 20px;
    margin-bottom: 20px;
}

.feature-card {
    flex: 1;
    background: white;
    border-radius: 14px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 14px;
    position: relative;
}

.fast-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
}

.feature-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.feature-subtitle {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

/* 医生问诊区域样式 */
.consultation-section {
    background: white;
    margin: 0 20px 24px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.consultation-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.consultation-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.more-link {
    font-size: 14px;
    color: #1890ff;
    cursor: pointer;
}

.department-tabs {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.tab-item {
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    user-select: none;
}

.tab-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

.tab-item:active {
    transform: scale(0.98);
}

.tab-item.active {
    background: #1890ff;
    border-color: #1890ff;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.tab-item.more {
    background: #f0f0f0;
    border-color: #d0d0d0;
    color: #666;
}

/* 医生列表样式 */
.doctors-list {
    padding: 0 0 24px 0;
}

.doctor-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 24px 28px 0;
    /* 右侧和底部保持原有padding，左侧无padding */
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    gap: 20px;
    min-height: 120px;
}

.doctor-card:last-child {
    border-bottom: none;
}

.doctor-info {
    display: flex;
    gap: 16px;
    flex: 1;
    align-items: flex-start;
    padding-left: 0;
    /* 内容紧贴左边缘，无左边距 */
}

.doctor-avatar {
    width: 60px;
    height: 60px;
    background: #e3f2fd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1890ff;
    flex-shrink: 0;
    margin: 0;
    position: absolute;
    top: 20px;
    left: 0;
    overflow: hidden;
    z-index: 2;
}

.doctor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #e3f2fd;
}

.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 50%;
    color: #1890ff;
    font-size: 28px;
    border: 2px solid #e3f2fd;
}

.doctor-details {
    flex: 1;
    min-width: 0;
    /* 确保flex子元素可以正确收缩 */
}

.doctor-name {
    font-size: 15px;
    font-weight: 600;
    color: #000;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.doctor-hospital {
    font-size: 12px;
    color: #000;
    margin-bottom: 12px;
    line-height: 1.4;
    max-height: 2.8em;
    /* 限制为两行高度 */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.consultation-types {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
}

.type-tag {
    padding: 5px 10px;
    background: white;
    border: 1px solid #1890ff;
    border-radius: 10px;
    font-size: 11px;
    color: #1890ff;
}

.doctor-expertise {
    font-size: 12px;
    color: #000;
    line-height: 1.4;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    max-height: 2.8em;
    /* 限制为两行高度 */
    overflow: hidden;
    position: relative;
}

.expand-arrow {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    flex-shrink: 0;
}

/* 添加省略号效果 */
.doctor-expertise::after {
    content: "...";
    position: absolute;
    bottom: 0;
    right: 20px;
    /* 为展开箭头留出空间 */
    background: white;
    padding-left: 4px;
    color: #666;
    font-size: 12px;
}

.doctor-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 11px;
    flex-wrap: wrap;
    max-height: 2.2em;
    overflow: hidden;
}

.rating {
    color: #ff4d4f;
    font-weight: 500;
}

.separator {
    color: #000;
}

.banners {
    color: #000;
}

.views {
    color: #ff4d4f;
}

.price-and-button-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.doctor-price {
    font-size: 16px;
    font-weight: 600;
    color: #ff8c00;
}

.ask-doctor-btn {
    background: #1890ff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.ask-doctor-btn:hover {
    background: #40a9ff;
}

.view-more-doctors {
    text-align: center;
    padding: 16px 0;
    color: #1890ff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 16px 24px;
    border: 1px solid #e0e0e0;
}

.view-more-doctors:hover {
    background: #e3f2fd;
    border-color: #1890ff;
    color: #1976d2;
}

.auto-load-hint {
    text-align: center;
    padding: 16px 0;
    color: #666;
    font-size: 14px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 16px 24px;
    border: 1px solid #e0e0e0;
}

.view-more-doctors:hover {
    color: #40a9ff;
}

/* 为你推荐区域样式 */
.recommendations-section {
    background: white;
    margin: 0 20px 24px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recommendations-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.recommendations-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.recommendations-list {
    padding: 0 24px 24px;
}

.recommendation-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.recommendation-item:last-child {
    border-bottom: none;
}

.recommendation-item:hover {
    background: #f8f9fa;
}

.recommendation-content {
    flex: 1;
    margin-right: 16px;
}

.question-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.question-icon {
    width: 20px;
    height: 20px;
    background: #52c41a;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.question-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    line-height: 1.4;
}

.answer-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doctor-avatar-small {
    font-size: 16px;
    flex-shrink: 0;
}

.doctor-name-small {
    font-size: 13px;
    color: #000;
    font-weight: 500;
}

.doctor-title {
    font-size: 12px;
    color: #666;
}

.content-tag {
    display: inline-block;
    background: #722ed1;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 8px;
}

.read-count {
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

/* 视频项目样式 */
.video-item .recommendation-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-right: 0;
}

.video-thumbnail {
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #1890ff, #40a9ff);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.video-title {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 4px;
}

.video-doctor {
    font-size: 10px;
    opacity: 0.9;
}

.video-department {
    font-size: 10px;
    opacity: 0.8;
}

.video-hospital {
    font-size: 9px;
    opacity: 0.7;
    line-height: 1.2;
}

.video-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 10px;
    padding: 2px 4px;
    border-radius: 4px;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 首页内容样式 */
.home-content {
    max-width: 600px;
    margin: 0 auto;
}

.welcome-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.welcome-section h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.welcome-section p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.action-card:hover {
    transform: translateY(-2px);
}

.action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.action-card span {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.news-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.news-section h3 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 18px;
}

.news-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-title {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.news-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* 消息列表页面样式 */
.list-content {
    max-width: 600px;
    margin: 0 auto;
}

.list-header {
    background: white;
    border-radius: 15px 15px 0 0;
    padding: 20px;
    margin-bottom: 1px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.list-header h3 {
    color: #333;
    margin: 0;
    font-size: 18px;
}

.list-items {
    background: white;
    border-radius: 0 0 15px 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.list-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s ease;
    position: relative;
}

.list-item:hover {
    background: #f8f9fa;
}

.list-item:last-child {
    border-bottom: none;
}

.list-icon {
    font-size: 24px;
    margin-right: 15px;
}

.list-info {
    flex: 1;
}

.list-title {
    color: #333;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 5px;
}

.list-desc {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 5px;
}

.list-time {
    color: #999;
    font-size: 11px;
}

.list-badge {
    background: #ff4757;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 用户页面样式 */
.user-content {
    max-width: 600px;
    margin: 0 auto;
}

.user-header {
    background: white;
    border-radius: 15px;
    padding: 30px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

.user-avatar {
    font-size: 48px;
    margin-right: 20px;
}

.user-info {
    flex: 1;
}

.user-name {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-phone {
    color: #666;
    font-size: 14px;
}

.user-menu {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.menu-section {
    padding: 20px 0;
}

.menu-section:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.menu-section h4 {
    color: #333;
    font-size: 16px;
    margin: 0 0 15px 20px;
    font-weight: 600;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.menu-item:hover {
    background: #f8f9fa;
}

.menu-icon {
    font-size: 20px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.menu-text {
    flex: 1;
    color: #333;
    font-size: 14px;
}

.menu-arrow {
    color: #ccc;
    font-size: 14px;
}

/* 底部导航样式 */
.bottom-nav {
    display: flex;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 12px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item:hover {
    background: #f8f9fa;
}

.nav-item.active {
    color: #667eea;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 6px;
}

.nav-text {
    font-size: 14px;
    color: #666;
}

.nav-item.active .nav-text {
    color: #667eea;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-header {
        padding: 14px 16px;
    }

    .back-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .app-name {
        font-size: 16px;
    }

    .app-subtitle {
        font-size: 13px;
    }

    .doctor-card {
        padding: 20px 16px 20px 0;
        min-height: 100px;
    }

    .doctor-avatar {
        width: 50px;
        height: 50px;
        top: 15px;
        left: 0;
    }

    .doctor-info {
        padding-left: 0;
    }

    .doctors-list {
        padding: 0 0 16px 0;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 12px 14px;
    }

    .back-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .header-left {
        gap: 8px;
    }

    .doctor-card {
        padding: 16px 12px 16px 0;
        min-height: 90px;
    }

    .doctor-avatar {
        width: 45px;
        height: 45px;
        top: 12px;
        left: 0;
    }

    .doctor-info {
        padding-left: 0;
    }

    .search-container {
        padding: 10px 15px;
    }

    .main-content {
        padding: 15px;
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .action-card {
        padding: 15px;
    }

    .action-icon {
        font-size: 28px;
    }
}